function y = sinquad(x)
% SINQUAD function
% x0= 0.1*ones(n,1);
n=length(x); y=(x(1)-1)^4;
for i=2:n-1
    
  y=y+(sin(x(i)-x(n))-(x(1))^2+(x(i))^2)^2;%+((x(n))^2-(x(1))^2);
end
y=y+((x(n))^2-(x(1))^2);


